﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Text;
using System.Windows.Markup;
using Kent.Boogaart.HelperTrinity;

namespace DemoSupport
{
	[ContentProperty("Steps")]
	public sealed class Demo : INotifyPropertyChanged
	{
		private string _title;
		private string _description;
		private readonly ObservableCollection<Step> _steps;

		public string Title
		{
			get
			{
				return _title;
			}
			set
			{
				if (_title != value)
				{
					_title = value;
					OnPropertyChanged("Title");
				}
			}
		}

		public string Description
		{
			get
			{
				return _description;
			}
			set
			{
				if (_description != value)
				{
					_description = value;
					OnPropertyChanged("Description");
				}
			}
		}

		public ObservableCollection<Step> Steps
		{
			get
			{
				return _steps;
			}
		}

		public event PropertyChangedEventHandler PropertyChanged;

		public Demo()
		{
			_steps = new ObservableCollection<Step>();
		}

		private void OnPropertyChanged(string propertyName)
		{
			EventHelper.Raise(PropertyChanged, this, new PropertyChangedEventArgs(propertyName));
		}
	}
}
